package com.lagou.service.impl;

import com.lagou.service.HelloService;
import org.apache.dubbo.config.annotation.DubboService;
import org.apache.dubbo.config.annotation.Service;
import org.apache.dubbo.rpc.RpcContext;

@DubboService
public class HelloServiceImpl implements HelloService {

    @Override
    public String sayHello(String name, int timeToWait) {

        String ip = RpcContext.getContext().getAttachment("ip");
        System.out.println("hello:"+name+",ip:"+ip);
        return "hello:"+name+",ip:"+ip;


    }
}
